## Import Necessary Data File
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
hb9301 = pd.read_csv('9301 Trajectory.csv')
hb9301
| Unnamed: 0 | DEPT | TVD | Incl | Azim Grid | Azim True | VSEC | AHD | NS | EW | DLS | Northing | Easting | Well | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 0.0000 | 0.00000 | 0.00 | 0.00 | 1.82 | 0.00 | 0.000000 | -8.38 | -0.350000 | NaN | 5157532.57 | 691819.0600 | Hebron 9301 |
| 1 | 1 | 174.6000 | 174.60000 | 0.00 | 0.00 | 1.82 | 0.00 | 0.000000 | -8.38 | -0.350000 | 0.00 | 5157532.57 | 691819.0600 | Hebron 9301 |
| 2 | 2 | 199.0200 | 199.02000 | 0.13 | 79.19 | 81.01 | 0.00 | 0.030000 | -8.37 | -0.320000 | 0.16 | 5157532.58 | 691819.0900 | Hebron 9301 |
| 3 | 3 | 220.5200 | 220.52000 | 0.07 | 121.93 | 123.75 | 0.00 | 0.060000 | -8.38 | -0.290000 | 0.13 | 5157532.57 | 691819.1200 | Hebron 9301 |
| 4 | 4 | 245.9200 | 245.92000 | 0.24 | 356.00 | 357.82 | -0.04 | 0.120000 | -8.33 | -0.280000 | 0.34 | 5157532.62 | 691819.1300 | Hebron 9301 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 10804 | 10804 | 3449.7264 | 2563.99993 | 29.39 | 172.28 | 174.10 | 1938.57 | 1969.805556 | -1939.02 | 174.805556 | 0.00 | 5155601.83 | 691994.2256 | Hebron 9301 |
| 10805 | 10805 | 3449.8788 | 2564.13271 | 29.39 | 172.28 | 174.10 | 1938.65 | 1969.886667 | -1939.10 | 174.816667 | 0.00 | 5155601.75 | 691994.2367 | Hebron 9301 |
| 10806 | 10806 | 3450.0312 | 2564.26550 | 29.39 | 172.28 | 174.10 | 1938.73 | 1969.967778 | -1939.18 | 174.827778 | 0.00 | 5155601.67 | 691994.2478 | Hebron 9301 |
| 10807 | 10807 | 3450.1836 | 2564.39828 | 29.39 | 172.28 | 174.10 | 1938.81 | 1970.048889 | -1939.26 | 174.838889 | 0.00 | 5155601.59 | 691994.2589 | Hebron 9301 |
| 10808 | 10808 | 3450.4700 | 2564.65000 | 29.39 | 172.28 | 174.10 | 1938.89 | 1970.130000 | -1939.34 | 174.850000 | 0.00 | 5155601.51 | 691994.2700 | Hebron 9301 |
10809 rows × 14 columns
#create a function
def formation(TVD):
if TVD <= 608:
return 'Banquereau Formation'
if 608< TVD <= 637:
return 'Oligocene Sandstone Unit'
if 637 < TVD <= 1368:
return 'Banquereau Formation'
if 1368< TVD <= 1379:
return 'South Mara Member'
if 1379 < TVD <= 1516:
return 'Banquereau Formation'
if 1516< TVD <= 1574:
return 'Mudstone Member Top'
if 1574 < TVD <= 1706:
return 'Dawson Canyon Formation'
if 1706< TVD <= 1711:
return 'Petrel Member'
if 1711< TVD <= 1815:
return 'Dawson Canyon Formation'
if 1815< TVD <= 1994:
return 'Nautilus Formation'
if 1994< TVD <= 2220:
return 'Ben Nevis Formation'
if 2220< TVD <= 2325:
return 'Avalon Formation'
if 2325< TVD <= 2566:
return 'Whiterose Formation'
else:
return 'No Formation Label Found'
# create a new column based on condition
hb9301['Formation'] = hb9301['TVD'].apply(formation)
#create a function
def holesize(TVD):
if TVD <= 1065.9105:
return 445
if 1065.9105 < TVD <= 1770.1321:
return 311
if 1770.1321 < TVD <= 2565.53107:
return 216
else:
return 'No Label Found'
# create a new column based on condition
hb9301['HoleSize'] = hb9301['TVD'].apply(holesize)
import plotly.express as px
fig =px.line_3d(hb9301, x='NS', y='EW',z='TVD',range_z=[2700,0],color = 'Formation',
title=" Hebron 9301 Trajectory Profile with Different Formation",
width=800,height=600,
template="simple_white")
fig.update_traces(line=dict(width=15))
fig.update_layout(legend=dict(
yanchor="top",
y=0.95,
xanchor="left",
x=0.91
))
fig.show()
import plotly.express as px
fig =px.line_3d(hb9301, x='NS', y='EW',z='TVD',range_z=[2700,0],color = 'HoleSize',
title=" Hebron 9301 Trajectory Profile with Different HoleSize",
width=800,height=600,
template="simple_white")
fig.update_traces(line=dict(width=10))
fig.update_layout(legend=dict(
yanchor="top",
y=0.95,
xanchor="left",
x=0.91
))
fig.show()